1. Field of the Invention
The present invention relates to a technique for cropping individual items of document image data from input image data containing a plurality of document images.
2. Description of the Related Art
An image reading device (referred to as a “scanner” below) reads documents such as photographs and text and generates electronic image data. For example, the specification of Japanese Patent Application Laid-Open No. 2002-010059 discloses a function that is convenient in a case where a document such as a print image smaller than the document glass of a scanner is scanned by the scanner. This function (referred to as “multi-crop scan” below) is such that when a plurality of documents are placed on the document glass of a scanner and scanned, the number of documents and their positions are detected automatically from the scan data. By cropping the individual documents from the scan data based upon the result of detection, the scanning of a plurality of documents is performed automatically by a single scanning operation.
More specifically, color scan data indicative of the entire surface of the document glass is acquired from the scanner and the acquired scan data is converted to a monochrome binary image using a predetermined threshold value. This threshold value is a value for determining whether or not a document is present. Since an area devoid of a document in the scan data has the color (white) of the document cover that presses a document against the document glass, the threshold value is set to a value that approximates white to thereby detect document position. By clipping each detected area from the scan data as individual image data, a plurality of images can be acquired by a single scan.
However, the optimum threshold value when a monochrome binary image for extracting document position is generated differs depending upon the color and material, etc., of the document. In the above-mentioned multi-crop scan, therefore, a problem which arises is that it is difficult to optimize the threshold value for all types of documents (material and colors, etc.). Consequently, there are instances where detection of document position fails owing to the type of document, thereby resulting in the acquisition of image data from which some documents are missing.